<template>
  <div>
    <div id="top_a">
      <div id="top_left">
        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>
        <span>|</span>

        <a href="">小米官网</a>

      </div>

      <div id="top_right">
        <a href="/login">登录</a>
        <span>|</span>

        <a href="/reg">注册</a>
        <span>|</span>

        <a href="">消息通知</a>

      </div>
    </div>



    <div id="top_2">

      <div>
        <img id="logo" :src="logo" alt="">

      </div>

      <div>
        <ul id="top_2_navigation">
          <li @mouseover="hoverTrue" @mouseleave="hoverFalse">
              <ul class="tran_li" @click="show3 = !show3" style="list-style-type: none;">
                <li>小米手机</li>
                <li>小米手机</li>
                <li>小米手机</li>
                <li>小米手机</li>
                <li>小米手机</li>
                <li>小米手机</li>
                <li>小米手机</li>
              </ul>
            <transition name="el-zoom-in-top"  >
                  <div v-show="show3" @mouseover="hoverTrue" @mouseleave="hoverFalse" style="position:absolute;right: 0;top: 140px;border-top: 1px solid darkgrey;z-index: 9999;background-color: white">
                    <div id="box2" class="transition-box">
                      <ul>
                        <li>
                          <a href="">
                            <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-shopapi-pms/pms_1647319964.75187703.png" alt="">
                            <span> Redmi Book Pro 15 2022</span>
                            <p class="price">7999元起</p>
                          </a>
                        </li>
                        <li>
                          <a href="">
                            <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-shopapi-pms/pms_1647319964.75187703.png" alt="">
                            <span> Redmi Book Pro 15 2022</span>
                            <p class="price">7999元起</p>
                          </a>
                        </li>
                        <li>
                          <a href="">
                            <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-shopapi-pms/pms_1647319964.75187703.png" alt="">
                            <span> Redmi Book Pro 15 2022</span>
                            <p class="price">7999元起</p>
                          </a>
                        </li>
                        <li>
                          <a href="">
                            <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-shopapi-pms/pms_1647319964.75187703.png" alt="">
                            <span> Redmi Book Pro 15 2022</span>
                            <p class="price">7999元起</p>
                          </a>
                        </li>
                        <li>
                          <a href="">
                            <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-shopapi-pms/pms_1647319964.75187703.png" alt="">
                            <span> Redmi Book Pro 15 2022</span>
                            <p class="price">7999元起</p>
                          </a>
                        </li>
                      </ul>
                    </div>
                  </div>
                </transition>
          </li>
        </ul>
      </div>
      <div id="top_2_input">
      <div id="search">
        <el-input v-model="input" placeholder="请输入搜索内容">
          <el-button slot="append" icon="el-icon-search"></el-button>
        </el-input>
      </div>
    </div>
    </div>
  </div>
</template>

<style>
.tran_li li{
  float: left;
  padding-left: 10px;
  margin: 0 10px;
}

body {
  margin: 0;
  padding: 0;
}

body > div > div {
  margin: 0 auto;
/*
  background-color: pink;
*/
  width: 1226px;
  height: 40px;
}

body > div {
  background-color: #B0B0B0;
  height: 40px;
}

#top_left {
  height: 40px;
  width: 800px;
  float: left;
}

#top_left a:hover{
  color: white;
}
#top_right {
  width: 300px;
  float: right;
  height: 40px;
/*
  background-color: black;
*/
}

#top_right a:hover{
  color: white;
}

#top_a a {
  text-decoration: none;
  color: #757575;
  font-size: 12px;
  line-height: 40px;
  margin: 0 10px;
  background-color: rgba(0, 0, 0, 0);
}

#top_2 {
  width: 1226px;
  height: 100px;
  float: left;
}

#top_2_navigation {
  margin: 0;
  list-style-type: none;
  line-height: 100px;
}

#top_2_input{
  line-height: 100px;
  margin-right: 150px;
}

.el-input{
  width: 240px;
  height: 35px;
}
.el-input__inner:focus{
  border: 1px solid orange;
}

#search{
  width: 45px;
  float: right;
  position: relative;
  right: 29px;
  display: inline-block;
}

#box2 {
  width: 1600px;
  height: 200px;
  text-align: center;
  color: #fff;
  padding: 40px 50px;
  box-sizing: border-box;
  border: 1px solid darkgrey;
  border-right: none;
}

#box2 ul li{
  overflow: hidden;
  float: left;
  margin-left: 100px;
}

#box2 ul li img{
  float: left;
  width: 150px;
  height: 150px;
  position: absolute;
  bottom: 50px;
}

#box2 ul li span{
  position: relative;
  top: 40px;
  display: inline-block;
  right: 30px;
  font-size: 16px;
  color: black;
}
.price{
  float: left;
  position: absolute;
  top: 100px;
  margin-left: 40px;
  color: orange;
  font-size: 14px;
}

#logo{
  width: 200px;
  height: 100px;
  float: left;
}
</style>


<script>
import shoplogo from '../assets/shoplogo.png'
export default {
  data: () => ({
    show3: false,
    logo:shoplogo,
    input:""
  }),
  methods:{
    hoverTrue(){
      this.show3=true;
    },
    hoverFalse(){
      this.show3=false;
    }
  }
}
</script>
